<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateQuestionsTable extends Migration {
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up() {
		Schema::create('questions', function (Blueprint $table) {
			$table->increments('id');
			$table->integer('user_id')->comment('用户ID');
			$table->integer('column_id')->comment('栏目ID');
			$table->text('title')->comment('问题标题');
			$table->text('content')->comment('问题内容');
			$table->string('status')->comment('问题状态');
			$table->integer('discuss')->comment('评论次数');
			$table->timestamps('created_at');
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down() {
		Schema::drop('questions');
	}
}
